package com.mms.imagegenius;

import android.graphics.Bitmap;
import android.view.ViewGroup;
import com.mms.imagegenius.datastructure.MMSPicture;

public class GalleryItem {

	private ViewGroup parentView;
	private int imgResID;
	Bitmap bImage = null;
	static final int width = 300;
	static final int height = 300;

	public GalleryItem(ViewGroup parentView, int imgResID) {
		this.parentView = parentView;
		this.imgResID = imgResID;
	}

	public GalleryItem(ViewGroup parentView, Bitmap bImage) {
		this.parentView = parentView;
		this.bImage = bImage; //TODO change this
	}

	
	ViewGroup getParentView() {
		return this.parentView;
	}

	int getImgResID() {
		return this.imgResID;
	}

	Bitmap getIconImg() {
		return MMSPicture.decodeSampledBitmapFromResource(parentView.getResources(), this.getImgResID(), GalleryItem.getWidth(), GalleryItem.getHeight());
	}

	Bitmap getImg() {
		return this.bImage;
	}

	static int getWidth() {
		return GalleryItem.width;
	}

	static int getHeight() {
		return GalleryItem.height;
	}
}
